package com.invoicing.Service;

import com.invoicing.dao.OrderMapper;
import com.invoicing.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService {
    @Autowired
    private OrderMapper orderMapper;

    public int insert(Order order){ return orderMapper.insertOrder(order);}

    public Order selectRecent(){ return orderMapper.selectRecent();}

    public Order selectById(int id){return  orderMapper.selectById(id);}

    public Order getById(int id){return orderMapper.selectById(id);}

    public float getTotalPrice(){return orderMapper.totalPrice();}
}
